<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core">

<h:head>

	<meta http-equiv="Content-Type"
		content="text/xhtml; charset=ISO-8859-1" />
	<meta http-equiv="CACHE-CONTROL" content="no-cache" />
	<meta http-equiv="Expires" content="-1" />
	<h:outputScript library="js" name="calendario_portugues.js" />
	<h:outputScript library="primefaces" name="jquery/jquery.js"
		target="head" />

	<title>.:: ControlCivil ::.</title>

	<script type="text/javascript">  
	function abrir(url, conversationID) {   
	 	var width = 1000;
	  	var height = 500; 
	  	var left = 99;
	  	var top = 99; 
  		window.open(url+'cid='+conversationID,'janela', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=yes, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
 
}
</script>

</h:head>

<h:body styleClass="body">

	<h:outputStylesheet library="css" name="style.css" />
	<h:outputStylesheet library="css" name="reset.css" />
	<h:outputStylesheet library="css" name="layout.css" />


	<div id="cabecalho">
		<div id="logo">
			<h:graphicImage value="/images/newlogo.png" title="Control Civil" />
		</div>
		<div align="right" id="loggof">
			<h:form>
				<h:panelGroup id="pnl_sair"
					rendered="#{sessionScope.USUARIO_LOGADO != null}">
					<b>Bem vindo <br /> #{homeMB.usuarioSessao.pessoa.nome} <br />
						Deseja <h:commandLink action="#{loginBean.logoff()}" value="Sair?"
							style="color: white;" /></b>
				</h:panelGroup>
			</h:form>
		</div>

		<div style="padding-top: 70px; padding-left: 14%; width: 70%">
			<h:form>
				<div id="myslidemenu" class="jqueryslidemenu">
					<nav>
					<ul class="menu">
						<h:panelGroup rendered="#{sessionScope.USUARIO_LOGADO != null}">
							<li><h:commandLink action="/pages/home.xhtml" value="Início"
									title="Início">
								</h:commandLink></li>


							<li><a href="#">Materiais</a>
								<ul>
								
									<li><h:commandLink action="#{estoqueMB.pesquisar()}"
											value="Estoque" title="Estoque"
											rendered="#{sessionScope.USUARIO_LOGADO != null}">
										</h:commandLink></li>
										
									<li><h:commandLink action="#{homeMB.fornecedorMaterial()}"
											value="Fornecedores" title="Fornecedor de Materiais"
											rendered="#{sessionScope.USUARIO_LOGADO != null}">
										</h:commandLink></li>
										
									<li><h:commandLink action="#{homeMB.material()}"
											value="Materiais" title="Consultar Material"
											rendered="#{sessionScope.USUARIO_LOGADO != null}">
										</h:commandLink></li>

								</ul></li>

							<li><a href="#">Obras</a>
								<ul>
									
									<h:panelGroup rendered="#{!homeMB.administrativo}">
										<li><h:commandLink action="#{consumoMB.pesquisar()}"
											value="Consumo" title="Consumo de Materiais"
											rendered="#{sessionScope.USUARIO_LOGADO != null}">
										</h:commandLink></li>
									</h:panelGroup>

									<li><h:commandLink action="#{homeMB.cub()}" value="Cub"
											title="Custo Unitário Básico"
											rendered="#{sessionScope.USUARIO_LOGADO != null}">
										</h:commandLink></li>

									<li><h:commandLink action="#{obraMB.pesquisar()}" value="Obras"
											title="Consultar Obras"
											rendered="#{sessionScope.USUARIO_LOGADO != null}">
										</h:commandLink></li>

									<li><h:commandLink action="#{homeMB.pedido()}"
											value="Pedidos" title="Pedidos Pedidos"
											rendered="#{sessionScope.USUARIO_LOGADO != null}">
										</h:commandLink></li>
								</ul></li>

							<li><a href="#">Pessoas</a>
								<ul>
									<li><h:commandLink action="#{homeMB.pessoas()}"
											value="Físicas" title="Consultar Pessoas Físicas">
											<f:param name="PESSOA_FISICA" value="true" />
										</h:commandLink></li>
										
									<li><h:commandLink action="#{homeMB.pessoas()}"
											value="Júridicas" title="Consultar Pessoas Jurídicas">
											<f:param name="PESSOA_FISICA" value="false" />
										</h:commandLink></li>
								</ul></li>



						</h:panelGroup>
					</ul>
					</nav>
				</div>
			</h:form>
		</div>
	</div>

	<div id="centro">
		<div id="msg">
			<h:messages errorClass="error" infoClass="success"
				warnClass="warning" id="mensagens" />
		</div>
		<f:view encoding="ISO-8859-1">
			<div id="conteudo">

				<ui:insert name="content">


				</ui:insert>


			</div>

		</f:view>
	</div>
	<div id="rodape"></div>
</h:body>

</html>
